package com.wyb.controller;

import com.wyb.constant.Result;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/root")
public class RootController {

    @GetMapping
    @PreAuthorize("hasAnyAuthority('sys:cm:list')")
    public Result Test(){
        return new Result(200, "用户正常访问", null);
    }

}
